home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / MacReleaseNotes.txt < prev    next >
Encoding:
Text File  |  1997-07-29  |  14.7 KB  |  342 lines  |  [TEXT/Moml]

  1. Mosml Mac 1.42e  Release Notes   1997July25   e  [Doug Currie <e@flavors.com>]
  2.  
  3. These are release notes for the Macintosh version of Moscow ML 1.42.
  4. See the Moscow ML distribution for non-Mac-specific notes.
  5.  
  6. Changes since Moscow ML 1.41e
  7.  
  8. (* *) known bugs
  9.  
  10. Denormalized floating point numbers cannot be read. These are numbers between
  11. zero and approximately +/-2.23e-308. See the section on MSL 2.1.2 below for 
  12. more info on how this will be addressed.
  13.  
  14. (* *) mosml-mac implemented as a shared library on PPC
  15.  
  16. The PPC version of mosml-mac is now supplied as a pair of files: a shared 
  17. library containing the bulk of mosml with the user interface, and a small (16k
  18. byte) application. The two files must be in the same folder, or else the shared 
  19. library must in the extensions folder in the system folder.
  20.  
  21. The advantage of the shared library implementation is that multiple copies of 
  22. mosml-mac can be made without consuming a lot of disk space. [When running with 
  23. virtual memory enabled, less RAM will be used, too.] Why would one want 
  24. multiple copies of mosml-mac? Read on, and you'll see that with the addition of 
  25. AppleScript support, and the ability to use mosml created cgi applications, 
  26. there are many reasons to have a few copies of mosml apps on your machine.
  27.  
  28. Actually, there are two PPC shared libraries and two applications supplied with 
  29. mosml-mac. One lib/app pair is the general purpose toplevel mosml application, 
  30. the other lib/app pair is specifically for cgi applications. See cgi below.
  31.  
  32. (* *) mosml-mac implemented as SANE application on 68k
  33.  
  34. The 68k version of mosml mac is supplied as a pair (general purpose & cgi) of 
  35. monolithic SANE applications. In the past, I supplied both SANE and m68881 
  36. versions. I decided that the archive would be too big with four copies of the 
  37. 68k apps, and that m68881 support was a marginal feature.
  38.  
  39. While the Mac does have a shared library mechanism for 68k code, called Code
  40. Fragment Manager (CFM-68k), it requires a system extension that has until very 
  41. recently been quite buggy. I'm also not sure about its processor and system 
  42. software requirements, either. So, I opted to leave it unsupported.
  43.  
  44. If you are disappointed by these decisions, please let me know. If there is 
  45. enough interest (i.e., one person who is willing to serve as a test subject), 
  46. I will create a release with m68881 and/or CFM-68k support. Or, if you have 
  47. MetroWerks CodeWarrior, I'll walk you through creating it yourself. If anyone 
  48. does try CFM-68k, please let me know how it works out for you.
  49.  
  50. (* *) drag and drop images
  51.  
  52. You can now drag and drop mosml images onto mosml-mac to launch them.
  53. This doesn't work after mosml-mac is running of course! (Quit first.)
  54. This overrides the image pathname heuristic, see below.
  55.  
  56. (* *) image pathname heuristic
  57.  
  58. Before using the default image name in the econfigstrs resource, mosml-mac 
  59. checks for an image name which, minus the pathname extension, matches the 
  60. application name, also minus the extension, in the same folder. 
  61. Specific extensions are required:
  62.  
  63. runtime application (e.g., a copy of mosml142app): ".app"
  64.     cgi application (e.g., a copy of mosml142cgi): ".cgi"
  65.                                             image: ".image"
  66.  
  67. For example, launching frob.app will try to load frob.image, but if it fails 
  68. to find an image of that name, will resort to the name in the econfigstrs 
  69. resource. Dragging and dropping an image onto frob.app will override this 
  70. behavior: the dropped image will be used instead.
  71.  
  72. This is especially useful for cgi applications (see the next section). In 
  73. this case, for example, a copy of mosml142cgi named "echo.cgi" will run the
  74. image named "echo.image" when launched from a web server.
  75.  
  76. (* *) cgi support
  77.  
  78. A version of mosml-mac which accepts cgi AppleEvents ('WWWΩ' 'sdoc') is 
  79. provided, mosml142cgi. This application is a full mosml runtime, but it does 
  80. not have a console or editor. It should only be launched by a web server, 
  81. which will send the application a cgi AppleEvent. All output to stdOut is 
  82. collected and returned to the web server in an AppleEvent reply at exit.
  83.  
  84. The environment of mosml142cgi is extended with several new variables. These 
  85. correspond to the UNIX CGI environment variables as closely as possible. They 
  86. can be obtained with Process.getEnv. In some cases stdIn will supply 
  87. additional data for the cgi request, e.g., POST. Use the environment variable 
  88. CONTENT_LENGTH to determine the number of characters waiting at stdIn.
  89.  
  90. The new environment variables are documented below.
  91.  
  92. The easiest method for constructing a mosml-mac cgi is as follows:
  93.  
  94. 1/ copy mosml142cgi
  95. 2/ rename it "X.cgi"
  96.    where X is a name of your choice
  97.    but shouldn't have spaces, slashes, or other nasty characters in it
  98. 3/ make and link your mosml cgi program; name it "X.image"
  99. 4/ move X.cgi and X.image to a folder accessible to your web server
  100. 5/ point an http link at X.cgi
  101.  
  102. Examples are located in the e_SML:cgi: folder.
  103.  
  104. mosml142cgi has a bare minimum user interface: Quit. Quitting should only 
  105. be necessary when your X.image has a bug which prevents it from exiting.
  106. You can Quit from the File menu or with Command-Q.
  107.  
  108. (* *) new environment variables
  109.  
  110. In all versions of mosml-mac:
  111.  
  112. VERSION          -- from application resource fork
  113. CAMLRUNPARAM     -- from application resource fork
  114. PATH_TRANSLATED  -- constructed at launch time
  115.  
  116. Examples:
  117.  
  118. - load "Process";
  119. > val it = () : unit
  120. - Process.getEnv "VERSION";
  121. > val it = SOME "mosml 1.42e" : string option
  122. - Process.getEnv "CAMLRUNPARAM";
  123. > val it = SOME "v=0i=50000s=50000o=20" : string option
  124. - Process.getEnv "PATH_TRANSLATED";
  125. > val it = SOME "jalaMPW:ml:mosml142:mosml142app" : string option
  126.  
  127. In the mosml142cgi version of mosml-mac only,
  128.  these are all constructed from the ('WWWΩ' 'sdoc') cgi AppleEvent:
  129.  
  130. var            Mac AE name   description
  131. ----------     ------------  -------------
  132. PATH_INFO            '----'  : arguments following the "$" in a URL
  133.  
  134. QUERY_STRING         'kfor'  : arguments following a "?" in a URL
  135.  
  136. REMOTE_HOST          'addr'  : Domain name of client (or IP address if no DNS)
  137.  
  138. REMOTE_ADDR          'Kcip'  : the TCP/IP address of the client
  139.  
  140. REMOTE_USER          'user'  : Username if authentication was required
  141.  
  142. REMOTE_PASS          'pass'  : Password if authentication was required
  143.  
  144. REQUEST_METHOD       'meth'  : the HTTP method being requested (e.g., GET,
  145.                                GET_CONDITIONAL, POST, etc.)
  146.  
  147. SCRIPT_NAME          'scnm'  : The (raw) path of the CGI being executed
  148.  
  149. SERVER_NAME          'svnm'  : Domain name of server (or IP address if no DNS)
  150.  
  151. SERVER_PORT          'svpt'  : TCP/IP port server is listening on
  152.  
  153. HTTP_REFERER         'refr'  : URL of page from which this CGI was referenced
  154.  
  155. HTTP_USER_AGENT      'Agnt'  : The WWW client software name and version
  156.  
  157. GATEWAY_INTERFACE    'Kact'  : The action being performed by the CGI,
  158.                                either the name of the user defined action or
  159.                                one of the strings: CGI, ACGI, PREPROCESSOR,
  160.                                POSTPROCESSOR, ERROR, INDEX, or NOACCESS.
  161.  
  162. CONTENT_TYPE         'ctyp'  : MIME type of POST arguments if present
  163.  
  164. CONTENT_LENGTH       'post'  : the size of the POST data;
  165.                                the POST data are placed on stdIn
  166.  
  167. References:
  168.  (UNIX) http://hoohoo.ncsa.uiuc.edu/cgi/interface.html
  169.  (Mac ) http://www.starnine.com/support/technotes/cgiparams-table.html
  170.  
  171. (* *) Processes.system is now implemented
  172.  
  173. The text argument to system() is sent to the AppleScript compiler and executed 
  174. as long as AppleScriptLib is in the Extensions folder. This is only tested on 
  175. PowerMacs. Using AppleScript and system() you can now send AppleEvents to other 
  176. applications, e.g., send e-mail, launch applications with the Finder, etc.
  177.  
  178. (* *) AppleScript library module
  179.  
  180. The module AppleScript supplies facilities for compiling, running, and 
  181. receiving results from AppleScripts. Examples are provided in e_SML of using 
  182. AppleScript from mosml to communicate with Microsoft Excel and Eudora. Many 
  183. Mac applications support scripting via AppleScript.
  184.  
  185. There are also many libraries of scripting additions available for use with 
  186. AppleScript, e.g., speech, encryption, etc. These libraries must be placed in 
  187. your extensions folder to be used from mosml-mac.
  188.  
  189. (* *) AppleEvent «event miscdosc»
  190.  
  191. Mosml142app supports an AppleEvent at launch to supply the command line to 
  192. mosml. Using the AppleScript library module, a second copy of mosml142app can 
  193. be employed to run specified images with command line arguments. I use this 
  194. mechanism to bootstrap mosml from one version to the next. 
  195. See e_SML:bootstrap: for examples.
  196.  
  197. (* *) now compiled with CodeWarrior Pro 1 and MSL 2.1.2+
  198.  
  199. The MetroWerks CodeWarrior Pro 1 release greatly improved the organization of 
  200. all the mosml-mac project files. It also necessitated a conversion from the 
  201. Plum Hall Standard C Library to the Metrowerks Standard Library (MSL).
  202. Unfortunately, the MSL has several bugs which affect mosml-mac. Many are 
  203. corrected with patches supplied as updated to MSL source files; this requires 
  204. rebuilding the libraries used in mosml. Some are patched with source files in 
  205. the mosml project.
  206.  
  207. With the patches, the only know bugs remaining are in the area of floating 
  208. point reading and writing. Metrowerks is working on this. Denormalized floats 
  209. cannot be read at all. Printing of floats is slightly inaccurate (i.e., in the 
  210. one or two LSBs of a double), and printf() rounds toward +/-infinity instead 
  211. of nearest or even. I have included a patch of my own to improve  rounding in 
  212. printf() for some common cases, but the real solution is a complete rewrite of 
  213. strtod() and printf(). I will wait to see if MSL improves soon before I take 
  214. this on myself.
  215.  
  216. A patch file rename_patch.c is included in the source distribution to make
  217. rename work for directories again. The linker warnings:
  218.   Link Warning : ignored ‘__rename_file’ (code) in MSL C.PPC (NL).Lib
  219.   Previously defined in rename_patch.c
  220.   Link Warning : ignored ‘__rename_file’ (descriptor) in MSL C.PPC (NL).Lib
  221.   Previously defined in rename_patch.c
  222. can be safely ignored.
  223.  
  224. MCL 2.1.2 epoch is 1900 not 1904, sometimes -- ugh! Patches supplied by MW.
  225.  
  226. See the folder MSLpatches.
  227.  
  228. (* *) TO DO
  229.  
  230. clean up use of errno
  231.  
  232. MSL chdir changed, works for StdFile?
  233.  
  234. nice to check type/creator in probe_image() uio.c
  235.  
  236. (* ************************************************************************* *)
  237.  
  238. Mosml Mac 1.41e   Release Notes   11Oct96 e
  239.  
  240. These are release notes for the Macintosh version of Moscow ML 1.41.
  241. See the Moscow ML distribution for non-Mac-specific notes.
  242.  
  243. Changes since Moscow ML 1.40
  244.  
  245. 1/ A bug which prevented the Mac m68k versions of Moscow ML from launching
  246. on some Macs running MacOS versions earlier than System 7.1.2 has been fixed.
  247. Thanks to Nazareth A. Karjian and Alexy Khrabrov for reporting this bug
  248. and helping me track it down.
  249.  
  250. 2/ A bug which prevented the Mac m68k versions of Moscow ML from correctly
  251. reporting the lack of FPU or M68020 instructions has been fixed.
  252.  
  253. 3/ The runtime may quit a little more gracefully in very low memory situations.
  254.  
  255. Changes since Moscow ML 1.31
  256.  
  257. - Toplevel
  258. - Runtime
  259. - Libraries
  260. - Tools
  261.  
  262. Toplevel
  263. --------
  264.  
  265. The herald now reads:
  266.  Moscow ML version 1.40 (1 July 1996)
  267.  Mangled by e & MacMake 15 July 1996
  268.  Use the Enter key to evaluate an input expression.
  269. The bit about the Enter key is meant to help new users over the Return
  270. versus Enter key hurdle (especially when the README has gone unread).
  271.  
  272. Runtime
  273. -------
  274.  
  275. 1/ A new Command menu item has been added: End of Input. It is intended
  276. to emulate the Control-D in UNIX. This was done at the request of a user
  277. (Jonas Barklund) who has students using both the Mac and UNIX versions.
  278. Using the End of Input command, or its command key equivalent <Command-;>
  279. (that's the Command key and Semicolon) from toplevel will cause Mosml to 
  280. quit. Using the End of Input command while awaiting input will cause any 
  281. typed characters to be Entered, and then whatever characters are available 
  282. to be returned, even if there are none or fewer than requested.
  283.  
  284. 2/ The Console now remembers the end point of the last input (plus Mosml's
  285. response, if any) and refuses to allow backspacing past that point. It
  286. beeps in response. This fixes a couple problems. For example, typing an 
  287. expression without a trailing semicolon results in no response; previously,
  288. many users would then backspace to the previous line, add the semicolon, 
  289. and type Enter (rather then simply typing the semicolon and Enter). This 
  290. resulted in the expression being entered twice. Now, the Console will 
  291. prevent you from backing up to connect two text "runs." You can still use 
  292. Cut or Clear to remove text from the Console window.
  293.  
  294. 3/ The Console and edit windows now do "live scrolling." To see it, grab 
  295. any scrollbar's "thumb" indicator, and drag it.
  296.  
  297. 4/ There are now FPU-required and no-FPU (SANE) versions of the m68k 
  298. runtime. At launch mosml will complain if the hardware resources are
  299. not sufficient to support the application.
  300.  
  301. 5/ A new command in the Search menu, Open Selection, can be used to open a
  302. file by selecting its name in any window and typing Command-D. This can also 
  303. be used with mosml's error messages; in this case  the file that caused the 
  304. error will be opened, and the error text scrolled-to and highlighted. For 
  305. example, selecting the line:
  306. File "errortest.sml", line 3-6, characters 4-75:
  307. and typing Command-D (or selecting the Open Selection menu item) will open 
  308. the file errortest.sml in an edit buffer with the four lines highlighted.
  309. This only works for files in the current directory, but this is almost always 
  310. where files will be if the compiler is complaining about them.
  311.  
  312. 6/ The runtime is a little better about handling low memory situations. There 
  313. is a new low memory alert, and opening new files is disabled until sufficient 
  314. memory becomes available. There are some small memory configurations (e.g., 
  315. PPC 1024k) where, due to the hysteresis built into the mechanism, once the low 
  316. memory condition is detected, it is impossible to open any more files until 
  317. you restart mosml... but at least you will be able to save files.
  318.  
  319. Libraries
  320. ---------
  321.  
  322. 1/ All the new Mosml Std Basis Library functions are supported, I think.
  323.  
  324. 2/ I've changed Path.sml once again. The pathname rules are the same,
  325. but the name "foo" is now canonical; before it was ":foo" which had
  326. some undesirable consequences. As a result of the change, the Path.base
  327. of "foo.bar" is now "foo" instead of ":foo" -- progress!?
  328.  
  329. 3/ Warning: On my PPC, (and perhaps on some 68k Macs) it sometimes looks as 
  330. if runtime is moving backwards, causing a Time.Time exception. This happens
  331. rarely, most often the first time the timer is used. I'm looking for a
  332. solution; Apple Tech support says "yeah, we know."
  333.  
  334. Tools
  335. -----
  336.  
  337. A folder of notes and utilities that I use to make the release are 
  338. included in the source distribution. Use at your own risk.
  339.  
  340. e [Doug Currie <e@flavors.com>]
  341.